package org.seckill.dto;

import org.seckill.entity.SuccessKilled;
import org.seckill.enums.SeckillStatEnum;

/**
 * 秒杀执行后结果
 * Created by chenhui479 on 16/11/20.
 */
public class SeckillExcution {
    private  long seckillId;

    //秒杀状态
    private int state;

    private String stateInfo;


    private SuccessKilled successKilled;

    public SeckillExcution(long seckillId, SeckillStatEnum seckillStatEnum,SuccessKilled successKilled) {
        this.seckillId = seckillId;
        this.state = seckillStatEnum.getSate();
        this.stateInfo = seckillStatEnum.getStateInfo();
        this.successKilled = successKilled;
    }

    public SeckillExcution(long seckillId,SeckillStatEnum seckillStatEnum) {
        this.seckillId = seckillId;
        this.state = seckillStatEnum.getSate();
        this.stateInfo= seckillStatEnum.getStateInfo();
    }

    public SeckillExcution(long seckillId, int state, String stateInfo) {
        this.seckillId = seckillId;
        this.state = state;
        this.stateInfo = stateInfo;
    }

    public long getSeckillId() {
        return seckillId;
    }

    public void setSeckillId(long seckillId) {
        this.seckillId = seckillId;
    }

    public int getState() {
        return state;
    }

    public void setState(int state) {
        this.state = state;
    }

    public String getStateInfo() {
        return stateInfo;
    }

    public void setStateInfo(String stateInfo) {
        this.stateInfo = stateInfo;
    }

    public SuccessKilled getSuccessKilled() {
        return successKilled;
    }

    public void setSuccessKilled(SuccessKilled successKilled) {
        this.successKilled = successKilled;
    }
}
